package ani.trainning.cacobatph;

import org.json.JSONObject;

public class _Quittance {

	protected static final String NUMERO_QUITTANCE  ="numeroQuittance";
	protected static final String OBJET_QUITTANCE  ="objetQuittance";
	protected static final String NUMERO_OBJET  ="numeroObjet";
	protected static final String DATE_IMPRESION  ="DateImpression";
	protected static final String N_COTISANT  ="n_cotisant";
	protected static final String COTISANT_RAISONSOCIAL  ="cotisantRaisonSocial";
	protected static final String COTISANT_ADRESSE  ="cotisantAdresse";
	protected static final String COTISANT_TELEPHONE  ="cotisantTelephone";
	protected static final String COTISANT_AGENCELIBELLE  ="cotisantAgenceLibelle";
	protected static final String COTISANT_AGENCE_ID  ="cotisantAgenceId";
	protected static final String COTISANT_WILAYA  ="cotisantWilaya";
	protected static final String AGENCE_ADRESSE  ="agenceAdresse";
	protected static final String AGENCE_TELEPHONE  ="agenceTelephone";
	protected static final String AGENCE_FAX  ="agenceFax"; 
	protected static final String PERIODE  ="anneePeriode";
	protected static final String NB_SALARIE_SORTANT  ="nbSalairieSortant";

	String numeroQuittance;
	String objetQuittance;
	String numeroObjet;
	String dateImpresion;
	String n_cotisant;
	String cotisantRaisonSocial;
	String cotisantAdresse;
	String cotisantTelephone;
	String cotisantAgenceLibelle;
	String cotisantAgenceId;
	String cotisantWilaya;
	String agenceAdresse;
	String agenceTelephone;
	String agenceFax;
	String anneePeriode;
	int nbSalariesSortants;

	public _Quittance(){

	}

	public _Quittance (String numeroQuittance,String objetQuittance,String numeroObjet,
			String dateImpresion , String n_cotisant ,	String cotisantRaisonSocial ,	String cotisantAdresse ,
			String cotisantTelephone ,	String cotisantAgenceLibelle,String cotisantAgenceId ,
			String cotisantWilaya ,	String agenceAdresse,	String agenceTelephone,	String agenceFax ,
			String anneePeriode, int  nbSalariesSortants)
	{

		this.numeroQuittance= numeroQuittance;
		this.objetQuittance =objetQuittance;
		this.numeroObjet= numeroObjet;
		this.dateImpresion =dateImpresion;
		this.n_cotisant =n_cotisant;
		this.cotisantRaisonSocial =cotisantRaisonSocial;
		this.cotisantAdresse =cotisantAdresse;
		this.cotisantTelephone =cotisantTelephone;
		this.cotisantAgenceLibelle= cotisantAgenceLibelle;
		this.cotisantAgenceId =cotisantAgenceId;
		this.cotisantWilaya =cotisantWilaya;
		this.agenceAdresse =agenceAdresse ;
		this.agenceTelephone= agenceTelephone;
		this.agenceFax= agenceFax;
		this.anneePeriode =anneePeriode;
		this.nbSalariesSortants = nbSalariesSortants;
	}

	public String getNumeroQuittance() {
		return numeroQuittance;
	}

	public String getObjetQuittance() {
		return objetQuittance;
	}

	public String getNumeroObjet() {
		return numeroObjet;
	}

	public String getDateImpresion() {
		return dateImpresion;
	}

	public String getN_cotisant() {
		return n_cotisant;
	}

	public String getCotisantRaisonSocial() {
		return cotisantRaisonSocial;
	}

	public String getCotisantAdresse() {
		return cotisantAdresse;
	}

	public String getCotisantTelephone() {
		return cotisantTelephone;
	}

	public String getCotisantAgenceLibelle() {
		return cotisantAgenceLibelle;
	}

	public String getCotisantAgenceId() {
		return cotisantAgenceId;
	}

	public String getCotisantWilaya() {
		return cotisantWilaya;
	}

	public String getAgenceAdresse() {
		return agenceAdresse;
	}

	public String getAgenceTelephone() {
		return agenceTelephone;
	}

	public String getAgenceFax() {
		return agenceFax;
	}

	public String getAnneePeriode() {
		return anneePeriode;
	}

	public int getNbSalariesSortants() {
		return nbSalariesSortants;
	}

	public static _Quittance quittanceFromJson(String jQuittance) throws Exception{

		JSONObject quittance=  new JSONObject(jQuittance);
		_Quittance _quittance = new _Quittance();

		_quittance.numeroQuittance  = quittance.getString(NUMERO_QUITTANCE);
		_quittance.objetQuittance = quittance.getString(OBJET_QUITTANCE);
		_quittance.numeroObjet = quittance.getString(NUMERO_OBJET);
		_quittance.dateImpresion = quittance.getString(DATE_IMPRESION);
		_quittance.n_cotisant = quittance.getString(N_COTISANT);
		_quittance.cotisantRaisonSocial = quittance.getString(COTISANT_RAISONSOCIAL);
		_quittance.cotisantAdresse = quittance.getString(COTISANT_ADRESSE);
		_quittance.cotisantTelephone = quittance.getString(COTISANT_TELEPHONE);
		_quittance.cotisantAgenceLibelle = quittance.getString(COTISANT_AGENCELIBELLE);
		_quittance.cotisantAgenceId = quittance.getString(COTISANT_AGENCE_ID);
		_quittance.cotisantWilaya = quittance.getString(COTISANT_WILAYA);
		_quittance.agenceAdresse = quittance.getString(AGENCE_ADRESSE);
		_quittance.agenceTelephone = quittance.getString(AGENCE_TELEPHONE);
		_quittance.agenceFax = quittance.getString(AGENCE_FAX);
		_quittance.anneePeriode = quittance.getString(PERIODE);
		_quittance.nbSalariesSortants = quittance.getInt(NB_SALARIE_SORTANT);

		return _quittance;
	}


}

